
package de.swta.freezay.base;

import de.swta.freezay.FreezaySession;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.model.IModel;
import org.apache.wicket.markup.html.resources.StyleSheetReference;

/**
 * The base page for all freezay-pages
 *
 * @author Jan Korreck
 * @author Christian Baeumer
 */
public class BasePage extends WebPage {

    /**
     * Constructor
     *
     * @param title the title of the page
     */ 
    public BasePage(String title) {
        this(null, title);
    }
    
    /**
     * Constructor
     *
     * @param model the model of the page
     * @param title the tilte of the page
     */
    public BasePage(IModel model, String title) {

        super(model);

        /* ref to stylesheet */
        add(new StyleSheetReference("stylesheet",
                BasePage.class, "../style.css"));
    }


    /**
     * Override to ensure that the right session class is used (FreezaySession)
     * @see WebPage.getSession()
     */
    @Override
    public FreezaySession getSession() {
        return (FreezaySession) super.getSession();
    }


}
